So. I'm currently working on a Firefox extension, and I've been testing it using web-ext, which clears the data on close. The extension has functionality across restarts, and in order to make sure it works I'd have to be able to have persistent local storage across restarts.
I made a testing profile and ran the --firefox-profile argument. The extension runs normally with the argument, but the storage doesn't carry over since web-ext makes a temp copy of the specified profile.
This is where the --keep-profile-changes argument comes in. However, when I ran it (web-ext run --firefox-profile "[profile-directory]" --keep-profile-changes --browser-console) the extension button on the toolbar would continually disappear and reappear. Whatever was messing up the extension was also throwing lots of "sendRemoveListener on closed conduit" errors in the browser console.
While looking for a solution, I found this Bugzilla report mentioning that browser.contextMenus.onClicked.addListener() (which I use in my extension) can cause that error to get thrown, but I can't seem to find a solution.
If parts of my code are needed to figure out how to fix this, let me know and I can edit the question to include it.